<template>
  <div>
    <p style="text-align: center" @click="gotobargainlist">全民砍价 &gt;</p>
    <div class="bargainlist">
      <van-card
        @click="gotobargainlist"
        v-for="(item, index) in goodsList"
        :key="index"
        :price="item.minPrice"
        :desc="item.characteristic"
        :title="item.name"
        :thumb="item.pic"
        :origin-price="item.originalPrice"
        v-show="index >= 9 && index <= 10"
      />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      goodsList: [],
    };
  },
  mounted() {
    this.$API.getList().then((res) => {
      // console.log(res.data.data);
      this.goodsList = res.data.data;
    });
  },
  methods: {
    gotobargainlist() {
      this.$router.push("/bargainlist");
    },
  },
};
</script>
<style lang="scss">
.bargainlist {
  width: 100%;
  // margin-bottom: 20rem;
  z-index: 111;
}
</style>